// +----------------------------------------------------------------------
// | xx [ xx赋能开发者，方便快捷开发]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.xxx.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed xx并不是自由软件，未经许可不能去掉xx相关版权
// +----------------------------------------------------------------------
// | Author: xx Team <xx@xx.com>
// +----------------------------------------------------------------------
// | Description:  本地存储localStorage是否加密
// +----------------------------------------------------------------------

import SecureLS from "secure-ls";
const ls = new SecureLS({
  isCompression: false, // 是否压缩
  encodingType: "base64", // 加密方式
  encryptionSecret: null, // 这个地方使用自己自定义的加密字符串
});

export const SelfStorage = {
  setItem(key, value) {
    ls.set(key, value);
  },
  getItem(key) {
    return ls.get(key);
  },
};
